Agreement Management Biz API
Update Consents TMF 651 PATCH
Update Customer accepted Consents to Salesforce.
URL
https://[localhost]:[port]/tmf-api/agreementManagement/v4/{businessId}/agreement
url Param
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (PR, BB, JM, PA, etc.) identifying the business unit. | Y |
Header
name | type | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y |
client_secret | string | Password associated with the client_id. | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request | N |
cURL request
curl --location --request PATCH 'https://nonprod.esb.cloud.lla.com/dev/agreement-management-biz/tmf-api/agreementManagement/v4/PR/agreement' \
--header 'X-Correlation-ID: 7263548193745' \
--header 'client_id: 12345' \
--header 'client_secret: abcde' \
--header 'Content-Type: application/json' \
--data '[
{
"op": "replace",
"path": "/agreement?agreementItem.productOffering.name=OrderId&agreementItem.productOffering.id=801do00000KlaR7AAJ&engagedParty.name=Digital&engagedParty.role=channel",
"value": [
{
"id": "MktPrefPostal",
"version": "2",
"agreementType": "MktPrefPostal",
"name": "MktPrefPostal",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "MktPrefEmail",
"version": "2",
"agreementType": "MktPrefEmail",
"name": "MktPrefEmail",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "MktPrefText",
"version": "2",
"agreementType": "MktPrefText",
"name": "MktPrefText",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "MktPrefCall",
"version": "2",
"agreementType": "MktPrefCall",
"name": "MktPrefCall",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "AutoPay",
"version": "2",
"agreementType": "AutoPay",
"name": "AutoPay",
"characteristic": [
{
"name": "paymentType",
"value": "NoneToAnyPM"
},
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "GeneralTnC",
"version": "2",
"agreementType": "GeneralTnC",
"name": "GeneralTnC",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Consented"
},
{
"id": "BillingPrefEmail",
"version": "2",
"agreementType": "BillingPrefEmail",
"name": "BillingPrefEmail",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "BillingPrefPostal",
"version": "2",
"agreementType": "BillingPrefPostal",
"name": "BillingPrefPostal",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"agreementType": "InsuranceConsent",
"name": "InsuranceConsent",
"characteristic": [
{
"name": "InsuranceConsent",
"valueType": "array",
"value": [
{
"id": "MSISDN 1",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 2",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 3",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
}
]
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"agreementType": "InstConsent",
"name": "InstConsent",
"characteristic": [
{
"name": "InstConsent",
"valueType": "array",
"value": [
{
"id": "MSISDN 2",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 1",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
}
]
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"agreementType": "TradeInConsent",
"name": "TradeInConsent",
"characteristic": [
{
"id": "MSISDN 1",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 2",
"mandatory": true/false,
"state": "Not Consented"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
]
}
]
}
]'
Definitions
Each of the request parameters is detailed.
Note: For SYS layers it's necessary to define the elements
name | value | description | required |
---|---|---|---|
payload[].op | String | Is the action to take. The following operations are supported: Add, Remove, Replace, Copy,Move, Test | Y |
payload[].path | String | is a pointer/reference to the field to change. | Y |
payload[].value | String | is the value to use, | Y |
Note: definition of the elements present in Value[] resources
name | type | description | required |
---|---|---|---|
id | String | Unique template id of the consent | Y |
version | String | Consent Text Version | N |
status | String | customers action for status, allowed value "Consented", "Not Consented" | Y |
agreementType | String | A categorization of an different types of consents related to an agreement, such as "General", "AutoPay", "BillingPref", "MarketingPref" | Y |
name | String | Name of the consent | Y |
characteristic | array | Describes a given characteristic of an object or entity through a name/value pair. | Y |
characteristic.name | String | Name of the characteristic | Y |
characteristic.valueType | String | Data type of the value of the characteristic | Y |
characteristic.value | any | The value of the characteristic | N |
Response
[
{
"id": "MktPrefPostal",
"version": "2",
"agreementType": "MktPrefPostal",
"name": "MktPrefPostal",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "MktPrefEmail",
"version": "2",
"agreementType": "MktPrefEmail",
"name": "MktPrefEmail",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "MktPrefText",
"version": "2",
"agreementType": "MktPrefText",
"name": "MktPrefText",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "MktPrefCall",
"version": "2",
"agreementType": "MktPrefCall",
"name": "MktPrefCall",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "AutoPay",
"version": "2",
"agreementType": "AutoPay",
"name": "AutoPay",
"characteristic": [
{
"name": "paymentType",
"value": "NoneToAnyPM"
},
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "GeneralTnC",
"version": "2",
"agreementType": "GeneralTnC",
"name": "GeneralTnC",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Consented"
},
{
"id": "BillingPrefEmail",
"version": "2",
"agreementType": "BillingPrefEmail",
"name": "BillingPrefEmail",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"id": "BillingPrefPostal",
"version": "2",
"agreementType": "BillingPrefPostal",
"name": "BillingPrefPostal",
"characteristic": [
{
"name": "mandatory",
"value": true/false
},
{
"name": "language",
"valueType": "string",
"value": "en-US"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
],
"status": "Not Consented"
},
{
"agreementType": "insuranceConsents",
"name": "insuranceConsents",
"characteristic": [
{
"name": "insuranceConsents",
"valueType": "array",
"value": [
{
"id": "MSISDN 1",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 2",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 3",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
}
]
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"agreementType": "installmentConsents",
"name": "installmentConsents",
"characteristic": [
{
"name": "installmentConsents",
"valueType": "array",
"value": [
{
"id": "MSISDN 2",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 1",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
}
]
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"agreementType": "tradeInConsents",
"name": "tradeInConsents",
"characteristic": [
{
"id": "MSISDN 1",
"consentTextVersion": "2",
"state": "Consented/Not Consented"
},
{
"id": "MSISDN 2",
"mandatory": true/false,
"state": "Not Consented"
}
],
"engagedParty": [
{
"id": "23636065-23637391",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "80178000000yiS2AAI",
"name": "orderId",
"referredType": "orderId"
}
]
}
]
Definitions
Each of the response parameters is detailed.
name | type | description | required |
---|---|---|---|
id | String | Unique template id of the consent | Y |
version | String | Consent Text Version | N |
status | String | customers action for status, allowed value "Consented", "Not Consented" | Y |
agreementType | String | A categorization of an different types of consents related to an agreement, such as "General", "AutoPay", "BillingPref", "MarketingPref" | Y |
name | String | Name of the consent | Y |
characteristic | array | Describes a given characteristic of an object or entity through a name/value pair. | Y |
characteristic.name | String | Name of the characteristic | Y |
characteristic.valueType | String | Data type of the value of the characteristic | Y |
characteristic.value | any | The value of the characteristic | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "The request is invalid or not properly formed.",
"description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
}]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The server could not find the requested resource.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method DELETE not allowed for : /{businessId}/agreement"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "Internal Server Error",
"description": "The request failed due to an internal error"
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation PATCH /agreement for Business Id: xxxx not implemented"
}]
}